package com.qf.mapper;

import com.qf.entity.MallGoodsBrand;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>title: com.qf.mapper</p>
 * <p>Company: wendao</p>
 * author zhuximing
 * date 2021/9/15
 * description:
 */
public interface GoodsBrandMapper {

    public List<MallGoodsBrand> findByPage(MallGoodsBrand brand);


    @Insert("insert into mall_goods_brand (name,first_letter,show_status,logo)" +
        "values (#{name},#{firstLetter},#{showStatus},#{logo})")
    public int save(MallGoodsBrand brand);
    @Update("update mall_goods_brand set name=#{name},first_letter=#{firstLetter},show_status=#{showStatus},logo=#{logo} where id=#{id}")
    int update(MallGoodsBrand brand);
    @Delete("delete from mall_goods_brand where id=#{id}")
    int delete(long id);

    int deleteList(List<MallGoodsBrand> brands);
    @Select("select * from mall_goods_brand")
    public List<MallGoodsBrand> findAll();
}
